{extend name='admin@main'}
{block name="content"}
<div class="think-box-shadow">
    {include file='trade/day_search'}
    <table class="layui-table margin-top-10" lay-skin="line" >
        {notempty name='list'}
        <thead>
        <tr>
            <th class="text-left nowrap">日期</th>
            <th class='text-left'>渠道</th>
            <th class='text-left'>新增人数</th>
            <th class='text-left'>活跃人数</th>
            <th class='text-left'>付费用户</th>
            <th class='text-left'>付费次数</th>
            <th class='text-left'>付费金额</th>
            <!--<th class='text-left'>钻石充值金额</th>
            <th class='text-left'>钻石充值人数</th>-->
            <th class='text-left'>arppu</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
            <tr>
                <td class='text-left nowrap'>{$vo.date}</td>
                <td class='text-left nowrap'>
                    {eq name='$vo.channel_name' value='0' }
                        官方-0-渠道
                    {else}
                    {$vo.channel_name}
                    {/eq}
                </td>
                <td class='text-left nowrap'>
                    <span class="color-red" style="font-weight: bold">
                         {$vo.dru}
                    </span>
                </td>
                <td class='text-left nowrap'>{$vo.dayactivity}</td>
                <td class='text-left nowrap'>{$vo.rechange_num}</td>
                <td class='text-left nowrap'>{$vo.order_num}</td>
                <td class='text-left nowrap'>
                    <span class="color-green" style="font-weight: bold">
                         {$vo.allmoney}
                    </span>
                </td>
                <!--<td class='text-left nowrap'></td>
                <td class='text-left nowrap'></td>-->
                <td class='text-left nowrap'>{$vo.arppu}</td>
            </tr>
        {/foreach}
        </tbody>
    </table>
    <table class="layui-table margin-top-10" lay-skin="line" >
        <thead>
        <tr>
            <th class="text-left nowrap" style="padding-left: 155px;" >合计</th>
            <th class='text-left nowrap'> 新增人数:<?php echo array_sum(array_column($data_arr,'dru')); ?></th>
            <th class='text-left nowrap'>活跃人数:<?php echo array_sum(array_column($data_arr,'dayactivity')); ?></th>
            <th class='text-left nowrap'>付费金额:<?php echo array_sum(array_column($data_arr,'allmoney')); ?></th>
            <th class='text-left nowrap'>付费用户:<?php echo array_sum(array_column($data_arr,'rechange_num')); ?></th>
            <th class='text-left nowrap'>付费次数:<?php echo array_sum(array_column($data_arr,'order_num')); ?></th>
        </tr>
        </thead>
    </table>
    {$pages | Raw}
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}
